<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">
<%@  taglib prefix="s" uri="/struts-tags"%>
<title>登录成功</title>

<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">

<link rel="stylesheet"
	href="http://apps.bdimg.com/libs/jqueryui/1.10.4/css/jquery-ui.min.css">
<script src="http://apps.bdimg.com/libs/jquery/1.10.2/jquery.min.js"></script>
<script
	src="http://apps.bdimg.com/libs/jqueryui/1.10.4/jquery-ui.min.js"></script>

<body>
	<form action="slogoutaction.action" method="post">
		<%
			if (session.getAttribute("user") == null
				|| !session.getAttribute("role").equals("teacher")
					|| session.getAttribute("user") == "") {
		%>
		<script language="javascript">
			alert("需要登录");
			window.open("index.jsp", "_self");
		</script>
		<%
			} else {
		%>
		<input type="hidden" name="user"
			value="<s:property value="username"/>" /> Hello "
		<% out.print(session.getAttribute("user")); %>
		" <input name="submit" type="submit" value="退出" />

		<%
			}
		%>

	</form>
	<br>
</body>
</html>

